<html>
<head>
	<title>Haan - Kreasi Ibu Juara</title>
	<!-- Bootstrap core CSS -->
	<link href="<?php echo css_theme('bootstrap.css'); ?>" rel="stylesheet" media="screen">
	<!-- font Awesome -->
	<link href="<?php echo css_theme('font-awesome.min.css'); ?>" rel="stylesheet" media="screen">
	<link href="<?php echo css_theme('font.css'); ?>" rel="stylesheet" media="screen">
	<!-- Custom styles for this template -->
	<link href="<?php echo css_theme('camera.css'); ?>" rel="stylesheet" media="screen">
	<link href="<?php echo css_theme('theme.css'); ?>" rel="stylesheet" media="screen">
	<link href="<?php echo css_theme('tabs.css'); ?>" rel="stylesheet" media="screen">
	<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
	<meta name="viewport" content="width=device-width, initial-scale=1.0">
	<link rel="stylesheet" href="<?php echo css_theme('unleashSlider.css'); ?>">
	<link rel="stylesheet" href="<?php echo css_theme('owl.carousel.css'); ?>">
	<link rel="stylesheet" href="<?php echo css_theme('owl.theme.css'); ?>">
	<script>var siteUrl= '<?php echo site_url();?>';</script>
	<?php
		$old_meta                = isset($meta) ? $meta : array();
		$old_meta['description'] = (isset($old_meta['description']) ? $old_meta['description'] : array('name' => 'description', 'content' => 'Haan'));
		$old_meta['keywords'] 	= (isset($old_meta['keywords']) ? $old_meta['keywords'] : array('name' => 'keywords', 'content' => 'Haan'));
		$old_meta['author']      = (isset($old_meta['author']) ? $old_meta['author'] : array('name' => 'author', 'content' => 'Haan'));
		$new_meta                = array(
			array('name' => 'Content-type', 'content' => 'text/html; charset=utf-8', 'type' => 'equiv'),
			array('name' => 'viewport', 'content' => 'width=device-width, initial-scale=1.0')
		);
		
		$meta = array_merge($new_meta, $old_meta);
		echo meta($meta);

		$old_source_top = isset($source_top) ? $source_top : array();
		$new_source_top = array();
		$source_top     = array_merge($new_source_top, $old_source_top);

		if (isset($source_top) && count($source_top) > 0)
		{
			foreach ($source_top as $k)
			{
				echo $k."\n";
			}
		}
	?>
</head>
<body>
	<div id="fb-root"></div>
	<script>(function(d, s, id) {
	  var js, fjs = d.getElementsByTagName(s)[0];
	  if (d.getElementById(id)) return;
	  js = d.createElement(s); js.id = id;
	  js.src = "//connect.facebook.net/id_ID/sdk.js#xfbml=1&version=v2.3";
	  fjs.parentNode.insertBefore(js, fjs);
	}(document, 'script', 'facebook-jssdk'));</script>
	<header id="top" class="navbar-one navbar-static-top header-nav hidden-xs" role="banner">
		<div class="container">
			<div class="navbar-header">
				<button class="navbar-toggle collapsed" data-target=".bs-navbar-collapse" data-toggle="collapse" type="button">
					<span class="sr-only">Toggle navigation</span>
					<?php if(isset($socmed_home)): foreach ($socmed_home as $socmed): ?>
							<span class="icon-bar"><a target="_blank" href="<?php echo $socmed->socmed_link;?>"><i class="fa <?php echo $socmed->socmed_css;?>"></i></span>
					<?php endforeach; endif;	?>
				</button>
			</div>
			<nav class="collapse navbar-collapse bs-navbar-collapse pull-right">
				<ul class="socmed">
					<?php if(isset($socmed_home)): foreach ($socmed_home as $socmed): ?>
						<li class="<?php echo $socmed->socmed_name;?>"><a target="_blank" href="<?php echo $socmed->socmed_link;?>"><i class="fa <?php echo $socmed->socmed_css;?>"></i></a></li>
					<?php endforeach; endif;?>
				</ul>
			</nav>
		</div>
	</header>
	<header id="top" class="navbar-two navbar-static-top-two header-nav-two hidden-xs" role="banner">
		<div class="container">
			<div class="navbar-header">
				<button class="navbar-toggle collapsed" data-target=".menu-navbar-collapse" data-toggle="collapse" type="button">
					<span class="sr-only">Toggle navigation</span>
					<span class="icon-bar"></span>
					<span class="icon-bar"></span>
					<span class="icon-bar"></span>
				</button>
				<a href="<?php echo site_url(); ?>"><img src="<?php echo img_theme('logo.png'); ?>" id="logo"></a>
			</div>
			<nav class="collapse navbar-collapse menu-navbar-collapse" style='padding-right:0px !important;'>
				<ul class="nav navbar-nav">
					<li class="dropdown">
						<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">PRODUK <span class="caret"></span></a>
						<ul class="dropdown-menu" role="menu">
				           <?php if(isset($get_cat_produk)): foreach ($get_cat_produk as $cat_produk): ?>
								<li><a target="_blank" href="<?php echo site_url('products/categories/'.$cat_produk->cp_id.'/'.$cat_produk->cp_name); ?>"><?php echo $cat_produk->cp_name;?></a></li>
							<?php
							endforeach; endif; ?>
				        </ul>
					</li>
					<li><a href="<?php echo site_url('/recipes'); ?>">RECIPES</a></li>
					<li><a href="<?php echo site_url('/events'); ?>">EVENT</a></li>
					<li><a href="<?php echo site_url('/articles'); ?>">ARTICLE</a></li>
					<li><a href="<?php echo site_url('/sms'); ?>">SMS</a></li>
				</ul>
				
				<div class="pull-right">
					<form action="<?php echo site_url('/home/result'); ?>" method="post">
						<div class="input-group haan-search">
							<input type="search" name="keyword" class="form-control" placeholder="search ...">
							<span class="input-group-addon btn-danger"><i class="fa fa-search"></i></span>
						</div>
					</form>
				</div>
				<div style='float:right;padding-top:10px;padding-right:10px;'>
					<a href="http://www.gandummas.co.id" target='_blank'>
						<img id='logo-chef' src='<?php echo img_theme('logo-chef-large.png'); ?>' />
					</a>
				</div>
			</nav>
		</div>
	</header>

	<header class="visible-xs" id="top-xs">
		<ul class="socmed">
			<?php if(isset($socmed_home)): foreach ($socmed_home as $socmed): ?>
				<li class="<?php echo $socmed->socmed_name;?>"><a target="_blank" href="<?php echo $socmed->socmed_link;?>"><i class="fa <?php echo $socmed->socmed_css;?>"></i></a></li>
			<?php endforeach; endif;?>
		</ul>
	</header>

	<header class="visible-xs" id="menu-xs">
		<nav class="navbar navbar-inverse navbar-fixed-top">
			<div class="container">
				<div class="navbar-header">
					<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
						<span class="sr-only">Toggle navigation</span>
						<span class="icon-bar"></span>
						<span class="icon-bar"></span>
						<span class="icon-bar"></span>
					</button>
					<a href="<?php echo site_url(); ?>"><img src="<?php echo img_theme('mini-logo.png'); ?>" id="mini-logo"></a>
				</div>
				<div id="navbar" class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
					<ul class="nav navbar-nav">
						<li class="dropdown">
							<a href="<?php echo site_url('products'); ?>" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">PRODUK<span class="caret"></span></a>
							<ul class="dropdown-menu" role="menu">
					            <?php if(isset($get_cat_produk)): foreach ($get_cat_produk as $cat_produk): ?>
									<li><a target="_blank" href="<?php echo site_url('products/categories/'.$cat_produk->cp_id.'/'.$cat_produk->cp_name); ?>"><?php echo $cat_produk->cp_name;?></a></li>
								<?php
								endforeach; endif; ?>
					        </ul>
						</li>
						<li><a href="<?php echo site_url('/recipes'); ?>">RECIPES</a></li>
						<li><a href="<?php echo site_url('/events'); ?>">EVENT</a></li>
						<li><a href="<?php echo site_url('/articles'); ?>">ARTICLE</a></li>
						<li><a href="<?php echo site_url('/sms'); ?>">SMS</a></li>
					</ul>
				</div>
				<!--/.nav-collapse -->
			</div>
		</nav>
		
	</header>

	<?php echo $this->content(); ?>

	<footer>
		<div class="container">
			<div class="row footer">
				<!-- <div class="col-md-3" style=' width: 16.6667% !important;'>
					<h3>Produk</h3>
				    <ul class="nav-link-url">
				    	<?php if(isset($get_cat_produk)): foreach ($get_cat_produk as $cat_produk): ?>
								<li><a target="_blank" href="<?php echo site_url('products/categories/'.$cat_produk->cp_id.'/'.$cat_produk->cp_name); ?>"><?php echo $cat_produk->cp_name;?></a></li>
							<?php
						endforeach; endif; ?>
				    </ul>
				</div>
				<div class="col-md-3" style=' width: 16.6667% !important;'>
					<h3>Recipes</h3>
					<ul class="nav-link-url">
				    	<?php if(isset($get_cat_resep)): foreach ($get_cat_resep as $cat_resep): ?>
								<li><a target="_blank" href="<?php echo site_url('recipes/detail/'.slugify($cat_resep->cr_name).'/'.$cat_resep->cr_id); ?>"><?php echo $cat_resep->cr_name;?></a></li>
							<?php
						endforeach; endif; ?>
				    </ul>
				</div>
				<div class="col-md-3" style=' width: 16.6667% !important;'>
					<h3>Event</h3>
				    <ul class="nav-link-url">
				    	<?php if(isset($event_home)): foreach ($event_home as $event): ?>
		    					<?php 
									$find = array(" ",":");
									$name_event = str_replace($find,"-",$event->e_name);
								?>
								<li><a style='color:#FFF !important;' href="<?php echo site_url('events/detail-events/'.$event->e_id.'/'.$name_event)?>"><?php echo $event->e_name ?></a></li>
							<?php
						endforeach; endif; ?>
				    </ul>
				</div>
				<div class="col-md-3" style=' width: 16.6667% !important;'>
					<h3>Article</h3>
					<ul class="nav-link-url">
				    	<?php if(isset($get_cat_article)): foreach ($get_cat_article as $cat_article): ?>
								<li><a target="_blank" href="<?php echo site_url('articles/cat/'.$cat_article->ca_id); ?>"><?php echo $cat_article->ca_name;?></a></li>
							<?php
						endforeach; endif; ?>
				    </ul>
				</div> -->
				<?php 
				if(isset($widget_home)) { ?>
					<div class="col-md-4 col-sm-12" style='width:28.3333%;margin-left:28px;margin-top:-5px;padding-bottom:10px;'>
						<h3><?php echo $widget_footer[0]->widget_name; ?></h3>
						<?php echo $widget_footer[0]->widget_source;?>
					</div>
					<div class="col-md-4 col-sm-12" style='padding-bottom:10px;margin-top:-10px'>
						<h3><?php echo $widget_footer[1]->widget_name; ?></h3>
						<?php echo $widget_footer[1]->widget_source;?>
					</div>
					<div class="col-md-4 col-sm-12" style='width:28.3333%;margin-left:70px;padding-bottom:10px;margin-top:25px;'>
						<h3><?php echo $widget_footer[2]->widget_name; ?></h3>
						<?php echo $widget_footer[2]->widget_source;?>
					</div>
				<?php }

				if(isset($widget_home)): foreach ($widget_home as $widget): 
						if ($widget->widget_place == 2)	{ ?>
							<!-- <div class="col-md-4 col-sm-12" style='padding-bottom:10px;'>
								<h3><?php echo $widget->widget_name; ?></h3>
								<?php echo $widget->widget_source; ?>
							</div> -->
					<?php }	
				endforeach; endif; ?>
			</div>
		</div>
		<!-- <div class="container">
			<div class="footer-bottom">
				<p>&copy Haanies 2015</p>
			</div>
		</div> -->
	</footer>
	 <!-- Bootstrap core JavaScript
	================================================== -->
	<!-- Placed at the end of the document so the pages load faster -->
	<script src="<?php echo js_theme('jquery.1.11.2.min.js'); ?>"></script>
	<script src="<?php echo js_theme('owl.carousel.js'); ?>"></script>
	<script>
        $(document).ready(function() {
           	unleashSlider('.slider2');
			$("#oemah-demo").owlCarousel({
			  navigation : true,
			  navigationText : ['<span class="glyphicon glyphicon-chevron-left" aria-hidden="true"></span>','<span class="glyphicon glyphicon-chevron-right" aria-hidden="true"></span>'],
			  pagination : false
			});
			$("#oemah-sliders-products").owlCarousel({
		 	  navigation : true, // Show next and prev buttons
		 	  navigationText : ['<span class="glyphicon glyphicon-chevron-left" aria-hidden="true"></span>','<span class="glyphicon glyphicon-chevron-right" aria-hidden="true"></span>'],
		      slideSpeed : 300,
		      paginationSpeed : 400,
		      pagination : false,
		      singleItem:true
		  	});
		  	 $("ul#tabs li").click(function(e){
		        if (!$(this).hasClass("active")) {
		            var tabNum = $(this).index();
		            var nthChild = tabNum+1;
		            $("ul#tabs li.active").removeClass("active");
		            $(this).addClass("active");
		            $("ul#tab li.active").removeClass("active");
		            $("ul#tab li:nth-child("+nthChild+")").addClass("active");
		        }
		    });
		});
    </script>
	<script src="<?php echo js_theme('bootstrap.min.js'); ?>"></script>
    <script type="text/javascript" src="//code.jquery.com/jquery-migrate-1.2.1.min.js"></script>
	<script src="<?php echo js_theme('jquery.min.js'); ?>"></script>
	<script src="<?php echo js_theme('jquery.mobile.customized.min.js'); ?>"></script>
	<script src="<?php echo js_theme('jquery.easing.1.3.js'); ?>"></script>
	<script src="<?php echo js_theme('camera.js'); ?>"></script>
	<!-- IE10 viewport hack for Surface/desktop Windows 8 bug -->
	<script src="<?php echo js_theme('ie10-viewport-bug-workaround.js'); ?>"></script>
	<script src="<?php echo js_theme('unleashSlider.js'); ?>"></script>


	<script>
		jQuery(function(){
			jQuery('#camera_wrap_2').camera({
				height: '50%',
				width: '80%',
				loader: 'bar',
				pagination: false,
				thumbnails: true,
				mobileAutoAdvance: true,
				mobileEasing: '',
				mobileNavHover: true
			});
		});
	</script>
	<?php
		$old_source_bot	= isset($source_bot) ? $source_bot : array();
		$new_source_bot	= array();
		$source_bot = array_merge($new_source_bot, $old_source_bot);

		if (isset($source_bot) && count($source_bot) > 0)
		{
			foreach ($source_bot as $k)
			{
				echo $k."\n";
			}
		}
	?>
</body>
</html>